﻿using System.Collections.Generic;
using System.Xml.Linq; 
using System;
namespace Savviety.ServiceManager.API.Criteria
{
	public partial class CriteriaBuilder
	{           
        protected XElement GetReferenceElement(string managementPackName, string alias)
		{
			switch(managementPackName)
			{
		case "System.WorkItem.ChangeRequest.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.WorkItem.ChangeRequest.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.WorkItem.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.WorkItem.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.AdminItem.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.AdminItem.Library"), new XAttribute("Version", "7.5.8501.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.Library"), new XAttribute("Version", "7.5.8501.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.WorkItem.Incident.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.WorkItem.Incident.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.WorkItem.Problem.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.WorkItem.Problem.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.WorkItem.ReleaseRecord.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.WorkItem.ReleaseRecord.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.WorkItem.ServiceRequest.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.WorkItem.ServiceRequest.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.WorkItem.Activity.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.WorkItem.Activity.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.SupportingItem.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.SupportingItem.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.IncidentManagement.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.IncidentManagement.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.Knowledge.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.Knowledge.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.ProblemManagement.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.ProblemManagement.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.ReleaseManagement.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.ReleaseManagement.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.Core.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.Core.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.ServiceRequest.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.ServiceRequest.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.ServiceCatalog.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.ServiceCatalog.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "System.SLA.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.SLA.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.ActivityManagement.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.ActivityManagement.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.ChangeManagement.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.ChangeManagement.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.IncidentManagement.Configuration":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.IncidentManagement.Configuration"), new XAttribute("Version", "7.5.1561.0"), null, new XAttribute("Alias", alias));				 
				}
		case "System.Notifications.Library":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "System.Notifications.Library"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.ProblemManagement.Configuration":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.ProblemManagement.Configuration"), new XAttribute("Version", "7.5.1561.0"), null, new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.ReleaseManagement.Configuration":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.ReleaseManagement.Configuration"), new XAttribute("Version", "7.5.1561.0"), new XAttribute("PublicKeyToken", "31bf3856ad364e35"), new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.ServiceRequest.Configuration":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.ServiceRequest.Configuration"), new XAttribute("Version", "7.5.1561.0"), null, new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.ActivityManagement.Configuration":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.ActivityManagement.Configuration"), new XAttribute("Version", "7.5.1561.0"), null, new XAttribute("Alias", alias));				 
				}
		case "ServiceManager.ChangeManagement.Configuration":
				{
					return new XElement(NameSpace + "Reference", new XAttribute("Id", "ServiceManager.ChangeManagement.Configuration"), new XAttribute("Version", "7.5.1561.0"), null, new XAttribute("Alias", alias));				 
				}
		 
		}

		 throw new ArgumentException("Unknown Managment Pack");

		}
	 
	}
}

  